package cate.common.table.item;

import cate.common.table.ERow;
import cate.common.table.XSSFRowWrap;
import cate.common.util.random.RWItem;

public class HeroPartCompositeRow extends ERow implements RWItem {

    /** 英雄ID */
    public int heroTid;
    /** 所属分组 */
    public int groupId;
    /** 权重 */
    public double weight;

    @Override
    public void parse(XSSFRowWrap xrw) {
        super.parse(xrw);
        this.id = xrw.getInteger("id", 0);
        this.heroTid = xrw.getInteger("英雄id", 0);
        this.groupId = xrw.getInteger("所属分组", 0);
        this.weight = xrw.getDouble("权重", 0.0);
    }

    @Override
    public double getWeight() {
        return weight;
    }
}
